<extend name="Public:base"/>
<block name="title"> 武汉同兴一站办企业服务有限公司 优惠券列表 - 修改优惠券 </block>

<block name="header">
    <span class="action-span"><a href="#">修改优惠券</a></span>
    <span class="action-span1"><a href="#">武汉同兴一站办企业服务有限公司 修改优惠券</a></span>
    <!--   <span id="search_id" class="action-span1"> - 添加分类 </span>-->
    <div style="clear:both"></div>
</block>
<block name="body">

    <form action="{:U('Platform/edit')}" method="post" name="my_form" id="my_form" enctype="multipart/form-data">
        <table width="100%" id="general-table">
            <input type="hidden" value="{$res.entity_coupon_id}" name="entity_coupon_id">
            <tr>
                <td class="label">商品分类选择:</td>
                <td id="shopChoice">
                    <span id="class1" data-sort="2">
                        <select id="" name="class_list[]" style="width:150px;">
                            <option value="0">请选择商品分类</option>
                            <volist name="goods_class_arr" id="vo1">
                                <option value="{$coupon_info1.class_id}">{$coupon_info1.name}</option>
                            </volist>
                        </select>
                    </span>
                    <span id="class2" data-sort="3"></span>
                    <span id="class3" data-sort="4"></span>
                </td>
            </tr>

            <tr>
                <td class="label">商品选择:</td>
                <td id="shopChoice">
                    <span id="class4" style="border:1px solid #CCC;width:500px;height:200px"></span>
                </td>
            </tr>
            <tr>
                <td class="label">优惠券名称:</td>
                <td>
                    <input type='text' name='coupon_name' maxlength="20" value='{$coupon_info.coupon_name}' size='27' /> <font color="red">*</font>
                </td>
            </tr>

            <tr>
                <td class="label">优惠券介绍:</td>
                <td>
                    <input type='text' name='intro' maxlength="20" value='{$coupon_info.intro}' size='27' /> <font color="red">*</font>
                </td>
            </tr>

            <tr>
                <td class="label">兑换所需积分:</td>
                <td>
                    <input type='text' name='integral' maxlength="20" value='{$coupon_info.integral}' size='27' /> <font color="red">*</font>
                </td>
            </tr>

            <tr>
                <td class="label">VIP所专属:</td>
                <td>
                    <select id="" name="vip_exclusive" style="width:150px;">
                        <option value="0" <?= $coupon_info['vip_exclusive'] == 0 ?"selected":""; ?>>普通优惠券</option>
                        <option value="1" <?= $coupon_info['vip_exclusive'] == 1 ?"selected":""; ?>>VIP1以上可以兑换</option>
                        <option value="2" <?= $coupon_info['vip_exclusive'] == 2 ?"selected":""; ?>>VIP2以上可以兑换</option>
                        <option value="3" <?= $coupon_info['vip_exclusive'] == 3 ?"selected":""; ?>>VIP3以上可以兑换</option>
                        <option value="4" <?= $coupon_info['vip_exclusive'] == 4 ?"selected":""; ?>>VIP4以上可以兑换</option>
                        <option value="5" <?= $coupon_info['vip_exclusive'] == 5 ?"selected":""; ?>>VIP5以上可以兑换</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="label">开始领取时间:</td>
                <td>
                    <input type="text" name="start_time" onfocus="MyCalendar.SetDate(this)" value="{$coupon_info.start_time|date='Y-m-d H:i:s',###}">
                </td>
            </tr>
            <tr>
                <td class="label">结束领取时间:</td>
                <td>
                    <input type="text" name="end_time" onfocus="MyCalendar.SetDate(this)" value="{$coupon_info.end_time|date='Y-m-d H:i:s',###}">
                </td>
            </tr>

            <tr>
                <td class="label">可以使用时间:</td>
                <td>
                    <input type='text' name='use_time' maxlength="20" value="{$coupon_info.use_time}" size='27'/>天 <font color="red">*</font>
                </td>
            </tr>

            <tr id="lost">
                <td class="label">失效类型:</td>
                <td>
                    <input type="radio" name="lost_type" value="0" <?= $coupon_info['lost_type'] == 0 ?"checked":""; ?>/> 定期失效
                           <input type="radio" name="lost_type" value="1" <?= $coupon_info['lost_type'] == 1 ?"checked":""; ?>/> 周期性失效
                </td>
            </tr>

            <tr id="regular" <?= $coupon_info['lost_type'] == 1 ?" style='display:none'":''; ?>>
                <td class="label">定期失效时间:</td>
                <td>
                    <input type='text' name='lost_time' maxlength="20"  onfocus="MyCalendar.SetDate(this)" value="{$coupon_info.lost_time|date='Y-m-d H:i:s',###}" size='27'  /> <font color="red">*</font>
                </td>
            </tr>

            <tr id="cycle" <?= $coupon_info['lost_type'] == 0 ?" style='display:none'":''; ?>>
                <td class="label">周期失效时间:</td>
                <td>
                    <input type='text' name='lost_cycle' maxlength="20" value='{$coupon_info.lost_cycle}' size='27' />天 <font color="red">*</font>
                </td>
            </tr>


            <tr id="couponType">
                <td class="label">优惠卷类型:</td>
                <td>
                    <input type="radio" name="coupon_type" value="0" <?= $coupon_info['coupon_type'] == 0 ?"checked":""; ?>/> 代金劵
                           <input type="radio" name="coupon_type" value="1" <?= $coupon_info['coupon_type'] == 1 ?"checked":""; ?> /> 折扣劵
                </td>
            </tr>

            <tr id="quota" <?= $coupon_info['coupon_type'] == 1 ?"style='display:none'":""; ?>>
                <td class="label">代金卷时金额:</td>
                <td>
                    <input type='text' name='quota' maxlength="20" value='{$coupon_info.quota}' size='27'  /> 元
                </td>
            </tr>

            <tr id="discount" <?= $coupon_info['coupon_type'] == 0 ?"style='display:none'":""; ?>>
                <td class="label">折扣卷时折扣:</td>
                <td>
                    <input type='text' name='discount' maxlength="20" value='{$coupon_info.discount}' size='27' />注意：范围 0.00 - 10.00
                </td>
            </tr>

            <tr>
                <td class="label">优惠券数量:</td>
                <td>
                    <input type='text' name='coupon_num' maxlength="20" value='{$coupon_info.coupon_num}' size='27' /> <font color="red">*</font>
                </td>
            </tr>
            <tr>
                <td class="label">优惠券状态:</td>
                <td>

                    <input type="radio" name="state" value="1" <?= $coupon_info['state'] == 0 ?"checked":""; ?>>启用
                           <input type="radio" name="state" value="0" <?= $coupon_info['state'] == 1 ?"checked":""; ?>>禁用
                </td>
            </tr>

            <tr>
                <td class="label">是否显示在首页</td>
                <td>
                    <input type="radio" name="is_home" value="1" <?= $coupon_info['is_home'] == 1 ?"checked":""; ?>>是
                           <input type="radio" name="is_home" value="0" <?= $coupon_info['is_home'] == 0 ?"checked":""; ?>>否
                </td>
            </tr>


            <tr>
                <td class="label">条件（满多少才能领取）:</td>
                <td>
                    <input type='text' name='coudition' maxlength="20" value='{$coupon_info.conditions}' size='27' />元
                </td>
            </tr>

        </table>
        <div class="button-div">
            <input type="submit" value=" 确定 " />
        </div>
    </form>
</block>
<!--<link rel="stylesheet" href="/public/build/jquery.datetimepicker.css"/>-->
<script type="text/javascript" src="/public/Admin/JS/jquery.min.js"></script>
<script type="text/javascript" src="/public/Admin/JS/mydate.js"></script>
<!--<script type="text/javascript" src="/public/build/jquery.js"></script>-->
<!--<script type="text/javascript" src="/public/build/jquery.datetimepicker.js"></script>-->






